| 1. | So any kind of insertion sort won't work well.
|
| 2. | Bubble sort is a stable sort algorithm, like insertion sort.
|
| 3. | The average case for insertion sort is O ( n 2 ).
|
| 4. | I then use two for loops and do insertion sort.
|
| 5. | Insertion sort is then applied to the classified set.
|
| 6. | So, for fewer than 64 elements, Timsort reduces to an insertion sort.
|
| 7. | However, insertion sort provides several advantages:
|
| 8. | Thus insertion sort is an online algorithm.
|
| 9. | My experience is that humans use an insertion sort or bubble sort for short lists.
|
| 10. | The average case is also quadratic, which makes insertion sort impractical for sorting large arrays.
|